<template>
	<view class="content">
		<view class="swiper-s">
			 <swiper class="swiper" autoplay="true" >
				<swiper-item
				v-for="item in banner"
				:key="item.id"
				>
				<image :src="item.imageUrl"></image>
				</swiper-item>
			</swiper>
		</view>
		</view>
</template>

<script>
	export default {
		data() {
			return {
				banner: []
			}
		},
		onLoad() {
			uni.request({
				url: 'http://www.xiongmaoyouxuan.com/api/tab/1?start=0',
				method: 'GET',
				data: {},
				success: res => {
					console.log(res.data.data.banners)
					this.banner = res.data.data.banners
				},
				fail: () => {},
				complete: () => {}
			});
		},
		methods: {
		
		}
	}
</script>

<style lang="scss">
	.swiper-s{
		width: 100%;
		height: 330rpx;
		border: 1px solid #A83FDB;
		overflow: hidden;
		.swiper{
			image{
				width: 100%;
				height: 330rpx;
			}
		}
	}
</style>
